import request from '@/utils/request'

// 创建调拨记录
export function createStorageAllot(data) {
  return request({
    url: '/pekingfish/storage-allot/create',
    method: 'post',
    data: data
  })
}

// 更新调拨记录
export function updateStorageAllot(data) {
  return request({
    url: '/pekingfish/storage-allot/update',
    method: 'put',
    data: data
  })
}

// 删除调拨记录
export function deleteStorageAllot(id) {
  return request({
    url: '/pekingfish/storage-allot/delete?id=' + id,
    method: 'delete'
  })
}

// 获得调拨记录
export function getStorageAllot(id) {
  return request({
    url: '/pekingfish/storage-allot/get?id=' + id,
    method: 'get'
  })
}

// 获得调拨记录分页
export function getStorageAllotPage(query) {
  return request({
    url: '/pekingfish/storage-allot/page',
    method: 'get',
    params: query
  })
}

// 导出调拨记录 Excel
export function exportStorageAllotExcel(query) {
  return request({
    url: '/pekingfish/storage-allot/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
